﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace SAR
{
    public partial class HuiboMoni5:BasePageClass
    {
        public HuiboMoni5()
        {
            this.InitializeComponent();
        }
        public bool PreClick()
        {
            return true;
        }

        public bool NextClick()
        {

            return true;
        }


        //标签切换事件
        private void tab2_SARClick(object sender, MouseButtonEventArgs e)
        {
            this.tab2.SARIsSelected = true;
            this.tab1.SARIsSelected = false;
            this.tab3.SARIsSelected = false;
            this.tab4.SARIsSelected = false;

            this.grid2.Visibility = Visibility.Visible;
            this.grid1.Visibility = Visibility.Hidden;
            this.grid3.Visibility = Visibility.Hidden;
            this.grid4.Visibility = Visibility.Hidden;
        }

        private void tab1_SARClick(object sender, MouseButtonEventArgs e)
        {
            this.tab1.SARIsSelected = true;
            this.tab2.SARIsSelected = false;
            this.tab3.SARIsSelected = false;
            this.tab4.SARIsSelected = false;
            this.grid1.Visibility = Visibility.Visible;
            this.grid2.Visibility = Visibility.Hidden;
            this.grid3.Visibility = Visibility.Hidden;
            this.grid4.Visibility = Visibility.Hidden;
        }

        private void tab3_SARClick(object sender, MouseButtonEventArgs e)
        {
            this.tab3.SARIsSelected = true;
            this.tab2.SARIsSelected = false;
            this.tab1.SARIsSelected = false;
            this.tab4.SARIsSelected = false;
            this.grid1.Visibility = Visibility.Hidden;
            this.grid2.Visibility = Visibility.Hidden;
            this.grid3.Visibility = Visibility.Visible;
            this.grid4.Visibility = Visibility.Hidden;
        }

        private void tab4_SARClick(object sender, MouseButtonEventArgs e)
        {
            this.tab4.SARIsSelected = true;
            this.tab2.SARIsSelected = false;
            this.tab3.SARIsSelected = false;
            this.tab1.SARIsSelected = false;
            this.grid1.Visibility = Visibility.Hidden;
            this.grid2.Visibility = Visibility.Hidden;
            this.grid3.Visibility = Visibility.Hidden;
            this.grid4.Visibility = Visibility.Visible;
        }

        private void p1Grid1Head_SARClick(object sender, MouseButtonEventArgs e)
        {
            if (p1Grid1Head.SARIsUnfolded)
            {
                p1Grid1Head.SARIsUnfolded = false;
                p1Grid1.Visibility = Visibility.Collapsed;
            }
            else
            {
                p1Grid1Head.SARIsUnfolded = true;
                p1Grid1.Visibility = Visibility.Visible;
                p1Grid2.Visibility = Visibility.Collapsed;
                p1Grid3.Visibility = Visibility.Collapsed;
                p1Grid2Head.SARIsUnfolded = false;
                p1Grid3Head.SARIsUnfolded = false;
            }
        }

        private void p1Grid2Head_SARClick(object sender, MouseButtonEventArgs e)
        {
            if (p1Grid2Head.SARIsUnfolded)
            {
                p1Grid2Head.SARIsUnfolded = false;
                p1Grid2.Visibility = Visibility.Collapsed;
            }
            else
            {
                p1Grid2Head.SARIsUnfolded = true;
                p1Grid2.Visibility = Visibility.Visible;
                p1Grid1.Visibility = Visibility.Collapsed;
                p1Grid3.Visibility = Visibility.Collapsed;
                p1Grid1Head.SARIsUnfolded = false;
                p1Grid3Head.SARIsUnfolded = false;
            }
        }

        private void p1Grid3Head_SARClick(object sender, MouseButtonEventArgs e)
        {
            if (p1Grid3Head.SARIsUnfolded)
            {
                p1Grid3Head.SARIsUnfolded = false;
                p1Grid3.Visibility = Visibility.Collapsed;
            }
            else
            {
                p1Grid3Head.SARIsUnfolded = true;
                p1Grid3.Visibility = Visibility.Visible;
                p1Grid2.Visibility = Visibility.Collapsed;
                p1Grid1.Visibility = Visibility.Collapsed;
                p1Grid2Head.SARIsUnfolded = false;
                p1Grid1Head.SARIsUnfolded = false;
            }
        }

        private void p2Grid1Head_SARClick(object sender, MouseButtonEventArgs e)
        {
            if (p2Grid1Head.SARIsUnfolded)
            {
                p2Grid1Head.SARIsUnfolded = false;
                p2Grid1.Visibility = Visibility.Collapsed;
            }
            else
            {
                p2Grid1Head.SARIsUnfolded = true;
                p2Grid1.Visibility = Visibility.Visible;
                p2Grid2.Visibility = Visibility.Collapsed;
                p2Grid3.Visibility = Visibility.Collapsed;
                p2Grid4.Visibility = Visibility.Collapsed;
                p2Grid5.Visibility = Visibility.Collapsed;
                p2Grid2Head.SARIsUnfolded = false;
                p2Grid3Head.SARIsUnfolded = false;
                p2Grid4Head.SARIsUnfolded = false;
                p2Grid5Head.SARIsUnfolded = false;
            }
        }

        private void p2Grid2Head_SARClick(object sender, MouseButtonEventArgs e)
        {
            if (p2Grid2Head.SARIsUnfolded)
            {
                p2Grid2Head.SARIsUnfolded = false;
                p2Grid2.Visibility = Visibility.Collapsed;
            }
            else
            {
                p2Grid2Head.SARIsUnfolded = true;
                p2Grid2.Visibility = Visibility.Visible;
                p2Grid1.Visibility = Visibility.Collapsed;
                p2Grid3.Visibility = Visibility.Collapsed;
                p2Grid4.Visibility = Visibility.Collapsed;
                p2Grid5.Visibility = Visibility.Collapsed;

                p2Grid1Head.SARIsUnfolded = false;
                p2Grid3Head.SARIsUnfolded = false;
                p2Grid4Head.SARIsUnfolded = false;
                p2Grid5Head.SARIsUnfolded = false;
            }
        }

        private void p2Grid3Head_SARClick(object sender, MouseButtonEventArgs e)
        {
            if (p2Grid3Head.SARIsUnfolded)
            {
                p2Grid3Head.SARIsUnfolded = false;
                p2Grid3.Visibility = Visibility.Collapsed;
            }
            else
            {
                p2Grid3Head.SARIsUnfolded = true;
                p2Grid3.Visibility = Visibility.Visible;
                p2Grid2.Visibility = Visibility.Collapsed;
                p2Grid1.Visibility = Visibility.Collapsed;
                p2Grid4.Visibility = Visibility.Collapsed;
                p2Grid5.Visibility = Visibility.Collapsed;

                p2Grid2Head.SARIsUnfolded = false;
                p2Grid1Head.SARIsUnfolded = false;
                p2Grid4Head.SARIsUnfolded = false;
                p2Grid5Head.SARIsUnfolded = false;
            }
        }

        private void p2Grid4Head_SARClick(object sender, MouseButtonEventArgs e)
        {
            if (p2Grid4Head.SARIsUnfolded)
            {
                p2Grid4Head.SARIsUnfolded = false;
                p2Grid4.Visibility = Visibility.Collapsed;
            }
            else
            {
                p2Grid4Head.SARIsUnfolded = true;
                p2Grid4.Visibility = Visibility.Visible;
                p2Grid2.Visibility = Visibility.Collapsed;
                p2Grid3.Visibility = Visibility.Collapsed;
                p2Grid1.Visibility = Visibility.Collapsed;
                p2Grid5.Visibility = Visibility.Collapsed;

                p2Grid2Head.SARIsUnfolded = false;
                p2Grid3Head.SARIsUnfolded = false;
                p2Grid1Head.SARIsUnfolded = false;
                p2Grid5Head.SARIsUnfolded = false;
            }
        }

        private void p2Grid5Head_SARClick(object sender, MouseButtonEventArgs e)
        {
            if (p2Grid5Head.SARIsUnfolded)
            {
                p2Grid5Head.SARIsUnfolded = false;
                p2Grid5.Visibility = Visibility.Collapsed;
            }
            else
            {
                p2Grid5Head.SARIsUnfolded = true;
                p2Grid5.Visibility = Visibility.Visible;
                p2Grid2.Visibility = Visibility.Collapsed;
                p2Grid3.Visibility = Visibility.Collapsed;
                p2Grid4.Visibility = Visibility.Collapsed;
                p2Grid1.Visibility = Visibility.Collapsed;

                p2Grid2Head.SARIsUnfolded = false;
                p2Grid3Head.SARIsUnfolded = false;
                p2Grid4Head.SARIsUnfolded = false;
                p2Grid1Head.SARIsUnfolded = false;

            }
        }
    }
}